import env from './env.json' assert { type: 'json' };

let PACKAGE_ENV = process.env.PACKAGE_ENV || "DEV";
const envConf = env[PACKAGE_ENV];

console.log(process.env.PACKAGE_ENV , "===")

const nextConfig = {
  output: 'export',
  distDir: 'dist',
  reactStrictMode: false,
  env: envConf,
  async rewrites() {
    return {
      fallback: [
        {
          source: '/api/:path*',
          destination: `${envConf.httpHost}/:path*`,
        }
      ],
    }
  },
};

export default nextConfig;
